import { request } from '@/sheep/request';

const route = {
  path: 'business',
  name: 'seller.admin.business',
  component: () => import('./index.vue'),
  meta: {
    title: '商家列表',
  },
};

const api = {
  list: (params) =>
    request({
      url: '/operations/admin/shop',
      method: 'GET',
      params
    }),
  add_account:(data)=>
    request({
      url: `/operations/admin/shop`,
      method: 'POST',
      data
    }),
  edit_account:(id,data)=>
    request({
      url: `/operations/admin/shop/${id}`,
      method: 'PUT',
      data
    }),
  account_info: (id) =>
    request({
      url: `/operations/admin/shop/${id}`,
      method: 'GET',
    }),
  store_info: (id) =>
    request({
      url: `/operations/admin/store/${id}`,
      method: 'GET',
    }),
  store_edit: (id, data) =>
    request({
      url: `/operations/admin/store/${id}`,
      method: 'PUT',
      data,
    }),
  industry_list: (params) =>
    request({
      url: '/operations/admin/category',
      method: 'GET',
      params,
    }),
  add_aptitude: (data) =>
    request({
      url: '/operations/admin/category',
      method: 'POST',
      data,
    }),
  reapply_aptitude: (id, data) =>
    request({
      url: `/operations/admin/category/${id}`,
      method: 'PUT',
      data,
    }),
  brand_list:(params)=>
    request({
      url: '/operations/admin/brand',
      method: 'GET',
      params
    }),
};

export { route, api };